/*
 * @Author: ChunLai
 * @Date: 2022-03-28 17:15:21
 * @LastEditTime: 2025-09-04 17:38:14
 * @Description:
 * @FilePath: \02.bldinsure\src\utils\functions.js
 */
import request from "@/utils/request";
import { getCacheValue } from "@/methods/cache.js";

/**保费试算 */
export const apiGetRate = (data) => {
  const insuType = getCacheValue("page", "isNetInsure");
  let reqUrl = "/ms-planbook/planBook/apiGetRate";
  if (insuType == "3") {
    reqUrl = "/ms-insure/api/common/premiumQuotation";
  }
  return request.post(`${reqUrl}`, data, {
    json: true,
  });
};
/**获取代理人信息 */
export const getOrderDetail = (data) => {
  return request.post(`/ms-insure/api/common/detail`, data, { json: true });
};
/**获取代理人信息 */
export const checkStaffAsy = (data) => {
  return request.post(`/ms-insure/api/common/checkStaff`, data, { json: true });
};
/**核保接口 */
export const underwrite = (data) => {
  return request.post(`/ms-insure/api/bilaiduo/underwrite`, data, {
    json: true,
  });
};

/**支付接口 */
export const payment = (data) => {
  return request.post(`/ms-insure/api/bilaiduo/pay`, data, { json: true });
};

/**签约查询接口 */
export const paymentAuthQuery = (data) => {
  return request.post(`/ms-insure/api/common/paymentAuthQuery`, data, {
    json: true,
  });
};

/**签约申请接口 */
export const paymentAuthApply = (data) => {
  return request.post(`/ms-insure/api/common/paymentAuthApply`, data, {
    json: true,
  });
};

/**签约确认接口 */
export const paymentAuthConfirm = (data) => {
  return request.post(`/ms-insure/api/common/paymentAuthConfirm`, data, {
    json: true,
  });
};

/**转人核接口 */
export const toArtificial = (data) => {
  return request.post(`/ms-insure/api/common/artificial`, data, {
    json: true,
  });
};
